const co = require('co');
const fetch = require('node-fetch');
// co 让里面每一个执行的函数一步一步的执行，具体原理不是很【理解】
co(function *(){
    const res = yield fetch('http://v2.api.haodanku.com/item_detail/apikey/alansherlock/itemid/557787124271');
    const data = yield res.json();
    const msg = data.msg;
    console.log('msg',msg);
})